package suites.stub {
	import org.splink.deepsplink.page.IPageSupplier;
	import org.splink.deepsplink.page.Page;

	/**
	 * @author Max Kugland
	 */
	public class RequestPageStub extends Page {
		private var _history : Array;

		public function set history(history : Array) : void {
			_history = history;			
			setShowStrategy(new RequestShowStrategyStub(id, _history));
			setHideStrategy(new RequestHideStrategyStub(id, _history));
		}

		public function RequestPageStub(supplier : IPageSupplier) {
			super(supplier);
		}

		override public function onParamsChanged(params : Array) : void {
			_history.push("params-" + id + "-" + params.length);
		}

		override public function initialize() : void {
			if(params.length > 0) _history.push("params-" + id + "-" + params.length);
			
			_history.push("initialize-" + id);
			setInitialized();
		}

		override public function finalize() : void {
			_history.push("finalize-" + id);
		}
	}
}